Repository navigation
Retry a throttled page turn once after a 30-60 s pause; canary walk budget 15 MB - #21
Merged
Merged
Conversation
…udget 15 MB A press for the next page that gets no grid back (the site's /graphql answered 429 with no Retry-After) is now retried once in all three engines, after a random pause of 2/3 to 4/3 of --throttle-wait-seconds (default 45, 0 = off), in the same browser session and exit. The proxy budget is checked before the pause and before the second press. A second failure ends the run as before: partial, exit 6, next_page_throttled. The listing sidecar records throttle_retries. The canary's three-page walk passes --proxy-budget-mb 15 (the scraper's default stays 10): with --block-media the 2026-10-22 walk used 8.7 MB for pages 1 and 2 at 50 of 50 cards each. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CKsd7q25N19WzUZjrAdzx8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Canary run 39858684619 (2026-10-22, main
fd5e1c8, after the sticky-session change in #20) walked the listing throughVRBO_PROXYwith--block-media:/graphqlHTTP 429 (Provisioned request rate has been exceeded, noRetry-Afterheader), and the grid did not come back within 60 s;stop_reason: next_page_throttled, proxy traffic 8.7 MB of the 10 MB cap.Two things were wrong for this walk. A single throttled turn ended the run with no second try, even though the 429 is a rate response that clears. And 8.7 MB for two pages leaves too little of the 10 MB cap for a third page plus any retry.
Change
One paced retry of a throttled page turn, in all three engines
page_flow.advance_with_throttle_retrywraps the existing turn. When a press gets no new grid (the state that endsnext_page_throttled), it:--throttle-wait-seconds(30-60 s at the default 45) in the same browser, session and exit, with no relaunch and no pool advance;next_page_throttled.ProxyBudgetExceededbefore the pause, so no retry is made and the run stops withproxy_budget_exceeded./graphql429s, but Selenium has no response listener and cannot. The count is logged where it is known.--throttle-wait-secondsin playwright, selenium and pyppeteer: default 45,0= no retry. A negative value is an argparse error that names the flag.throttle_retries: the retries made in the run,0when none.Canary budget
paginationjob passes--proxy-budget-mb 15.first-page(no proxy) keeps 10, and the scraper's default stays 10..github/proxy_traffic.pyalready took the budget from the sidecar'sproxy_budget_bytes. Its docstring still said "of 10 MB" and now describes that.Docs
next_page_throttled.[Unreleased]: a behaviour-change blockquote plus Added and Changed entries.Evidence
Offline suite
requirements.txt):python smoke_test.pygave 772 passed, 0 failed. The engine-import groups skip there..github/ci_checks.py --help-check --sample-checkand--secret-checkpassed, andenv_config.pyran.New check group
test_throttle_retryThe pure helper is checked for:
ADVANCEDwith 1 retry, two presses, one pause in 30-60 s, the budget checked twice;NO_TURNOVERwith 1 retry after exactly two presses;0turns the retry off;NO_BUTTON;Through each engine's real
_fetch_one_page(engine copies with stub drivers, so this also runs in the core job):throttle_retries1, no relaunch or new exit;no_turnoverafter two presses;ProxyBudgetExceeded, one press;0gives no retry, and the default is 45.Through each engine's
scrape():throttle_retries1;next_page_throttled,throttle_retries1, 2 pages;throttle_retries0.Canary checks:
::error::stopped: proxy budget 15 MB exceeded;nullbudget reads as "no budget".Planted-fault controls
I ran 10 controls with
PYTHONDONTWRITEBYTECODE=1and__pycache__cleared before each run. Each one turned the suite red on its named check, and the restored tree was green (0 failures):No paid calls, no proxy and no credentials were used. No live request was made for this change.
Not changed
--proxy-budget-mb(10).--delay, the canary schedule and thefirst-pagejob.🤖 Generated with Claude Code
https://claude.ai/code/session_01CKsd7q25N19WzUZjrAdzx8